<template>
  <!--<img v-if="imgUrl" ref="img" :src="imgUrl | ossLink" alt @click="previewImage($event)">-->
  <img v-if="imgUrl" class="max-image" w="100" h="100" :src="imgUrl" :large="largeUrl" :preview="preview || imgUrl" :preview-text="text">
</template>

<script>
export default {
  name: 'HeyImage',
  components: {

  },
  props: {
    imgUrl: {
      type: String,
      required: true
    },
    largeUrl: {
      type: String
    },
    group: {
      type: String
    },
    text: {
      type: String
    }
  },
  data() {
    const preview = this.group
    return {
      preview
    }
  },
  computed: {

  },
  watch: {
  },
  created() {
  },
  mounted() {
  },
  methods: {
    previewImage() {
      const current = this.$refs.img.src
      if (typeof (WeixinJSBridge) !== 'undefined') {
        /* eslint-disable-next-line */
          WeixinJSBridge.invoke('imagePreview', {
          urls: [current],
          current
        })
      }
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
